package com.easyfile.easyfilemaster.entity.dto;

import com.easyfile.easyfilemaster.entity.base.ValidateRegex;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

/**
 * 手机号注册请求参数
 * @author chenpeman
 * @date 2022年05月06日 12:27
 */
@Data
public class MobileRegisterDto {
    @NotBlank(message = "手机号不能为空")
    @Pattern(regexp = ValidateRegex.MOBILE,message = "请输入正确的手机号")
    private String mobile;

    @NotBlank(message = "用户名不能为空")
    @Pattern(regexp = ValidateRegex.USERNAME,message = "用户名不合法")
    private String username;

    @NotBlank(message = "密码不能为空")
    @Pattern(regexp = ValidateRegex.PASSWORD,message = "密码不合法")
    private String password;

    @NotBlank(message = "验证码不能为空")
    @Size(max = 6,min = 6,message = "验证码长度错误")
    private String verCode;
}
